import request from '@/utils/request'

// 查询移库信息列表
export function listWmsTransfer(query) {
  return request({
    url: '/system/wmsTransfer/list',
    method: 'get',
    params: query
  })
}

// 查询移库信息详细
export function getWmsTransfer(id) {
  return request({
    url: '/system/wmsTransfer/' + id,
    method: 'get'
  })
}

// 新增移库信息
export function addWmsTransfer(data) {
  return request({
    url: '/system/wmsTransfer',
    method: 'post',
    data: data
  })
}

// 修改移库信息
export function updateWmsTransfer(data) {
  return request({
    url: '/system/wmsTransfer',
    method: 'put',
    data: data
  })
}

// 删除移库信息
export function delWmsTransfer(id) {
  return request({
    url: '/system/wmsTransfer/' + id,
    method: 'delete'
  })
}

//获取移库单编号
export function getTransferOrderNo(){
  return request({
    url: '/system/wmsTransfer/getTransferOrderNo',
    method: 'get'
  })
}

export function cancellation(query){
  return request({
    url: '/system/wmsTransfer/cancellation?id='+query,
    method: 'put',
  })
}
